package com.ch.mafia.db;

import java.sql.Connection;
import java.sql.DriverManager;

public class MyConnection {
	public static Connection GetConnection() throws Exception{
		Connection con =null;
		Class.forName("com.mysql.jdbc.Driver");
//		String url = "jdbc:mysql://chenghaoorange.gotoftp1.com/chenghaoorange?autoReconnect=true&useUnicode=true&characterEncoding=utf8";
//		String username = "chenghaoorange";
		String url = "jdbc:mysql://localhost/mafia?autoReconnect=true&useUnicode=true&characterEncoding=utf8";
		String username = "root";
	    String password = "861231";
	    con =DriverManager.getConnection(url,username,password);
	    return con;
	}
}
